<!--{template common/header}-->
<!--{eval}-->
    $language = 'language.'.currentlang().'.php';
    include ("./template/strong_a1/".$language);
<!--{/eval}-->
<!--{if empty($_GET['showratetip'])}-->
<!--{if $_GET[action] == 'rate'}-->
<div class="global_dialogbox">
	<form id="rateform" method="post" autocomplete="off" action="forum.php?mod=misc&action=rate&ratesubmit=yes&infloat=yes" onsubmit="ajaxpost('rateform', 'return_rate', 'return_rate', 'onerror');">
		<input type="hidden" name="formhash" value="{FORMHASH}" />
		<input type="hidden" name="tid" value="$_G[tid]" />
		<input type="hidden" name="pid" value="$_GET[pid]" />
		<input type="hidden" name="referer" value="$referer" />
		<!--{if !empty($_GET['infloat'])}--><input type="hidden" name="handlekey" value="rate"><!--{/if}-->
        <div class="head"><h3>{lang rate}</h3></div>
		<div class="content">        	
			<table cellspacing="0" cellpadding="0" class="dt mbm">
				<tr>
					<th width="65">&nbsp;</th>
					<th >&nbsp;</th>
					<th width="65">{lang rate_raterange}</th>
					<th width="65">{lang rate_todayleft}</th>
				</tr>
				<!--{eval $rateselfflag = 0;}-->
				<!--{loop $ratelist $id $options}-->
					<tr>
						<td>{$_G['setting']['extcredits'][$id][img]} {$_G['setting']['extcredits'][$id][title]}</td>
						<td>
                        	<div class="input_select">
								<input type="text" name="score$id" id="score$id" type="number" class="select" value="0" />
								<a href="javascript:;" class="dpbtn" onclick="showselect(this, 'score$id', 'scoreoption$id')"><i class="fa fa-angle-down fa-2x "></i></a>
								<ul id="scoreoption$id" class="scoreoption" style="display:none"><div>$options</div></ul>
                            </div>
						</td>
						<td>{$_G['group']['raterange'][$id]['min']} ~ {$_G['group']['raterange'][$id]['max']}</td>
						<!--{eval $rateselfflag = $_G['group']['raterange'][$id][isself] ? 1 : $rateselfflag;}-->
						<td>$maxratetoday[$id]</td>
					</tr>
				<!--{/loop}-->
			</table>
			<script>		
				function showselect(t,scoreid,optionid){						
					if($(t).siblings('ul').css('display')=='none'){
						$('.scoreoption').hide();					
						$(t).siblings('ul').show();						
					}else{
						$(t).siblings('ul').hide();
					}
				}
				
				$('.scoreoption li').live('click',function(){									
					$(this).parent().parent().siblings('input').val($(this).text());
					$(this).parents('ul').hide();
				});
			
					var popupobj = $("#ntcmsg_popmenu");
					
			setTimeout(function() {
					var defaulttop = parseInt($('.dialogbox').css('top'));
					$(".input_select input").live('focus',function(){	
						$(".scoreoption").hide();
						var dialogboxtop = parseInt($('.dialogbox').css('top'));									
						$('.dialogbox').css('top',((dialogboxtop+50)-($(this).offset().top-$(window).scrollTop())));
													
					});
					$(".input_select input").live('blur',function(){
						
						var dialogboxtop = parseInt($('.dialogbox').css('top'));			
						$('.dialogbox').css('top',defaulttop);
										
					});
			 }, '100');
			</script>
			<div class="input_select w mtm mbm">
            	<input type="text" name="reason" id="reason" class="select" placeholder="{echo $lang['Scorereasons'];}" />
                <a href="javascript:;" class="dpbtn" onclick="showselect(this, 'reason', 'reasonselect')"><i class="fa fa-angle-down fa-2x "></i></a>
				<!--{eval $selectreason = modreasonselect(0, 'userreasons')}-->
				<!--{if $selectreason}-->				
					 <ul id="reasonselect" class="scoreoption" style="display:none;"><div>$selectreason</div></ul>					 	
				<!--{/if}-->			
			</div>
          
			<!--{if $rateselfflag}-->
				<div class="xg1 mtm mbm">{lang admin_rate}</div>
			<!--{/if}-->
            <label for="sendreasonpm" class="xg1"><input type="checkbox" name="sendreasonpm" id="sendreasonpm" class="pc"{if $_G['group']['reasonpm'] == 2 || $_G['group']['reasonpm'] == 3} checked="checked" disabled="disabled"{/if} />{lang admin_pm}</label>
		</div>
		<div class="submit">
			
			<button name="ratesubmit" type="submit" value="true" class="formdialog" ><span>{lang confirms}</span></button>
		</div>
	</form>
</div>

<!--{elseif $_GET[action] == 'removerate'}-->

<form id="rateform" method="post" autocomplete="off" action="forum.php?mod=misc&action=removerate&ratesubmit=yes&infloat=yes">
	<div class="f_c">
		<h3 class="flb">
			<em id="return_rate">{lang thread_removerate}</em>
			<span>
				<!--{if !empty($_GET['infloat'])}--><a href="javascript:;" class="flbc" onclick="hideWindow('rate')" title="{lang close}">{lang close}</a><!--{/if}-->
			</span>
		</h3>
		<input type="hidden" name="formhash" value="{FORMHASH}" />
		<input type="hidden" name="tid" value="$_G[tid]">
		<input type="hidden" name="pid" value="$_GET[pid]">
		<input type="hidden" name="referer" value="$referer" />
		<!--{if !empty($_GET['infloat'])}--><input type="hidden" name="handlekey" value="rate"><!--{/if}-->
		<div class="c floatwrap">
			<table class="list" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<td>&nbsp;</td>
						<td>{lang username}</td>
						<td>{lang time}</td>
						<td>{lang credits}</td>
						<td>{lang reason}</td>
					</tr>
				</thead>
			<!--{loop $ratelogs $ratelog}-->
				<tr>
					<td><input type="checkbox" name="logidarray[]" value="$ratelog[uid] $ratelog[extcredits] $ratelog[dbdateline]" /></td>
					<td><a href="home.php?mod=space&uid=$ratelog[uid]">$ratelog[username]</a></td>
					<td>$ratelog[dateline]</td>
					<td>{$_G['setting']['extcredits'][$ratelog[extcredits]][title]} <span class="xw1">$ratelog[scoreview]</span> {$_G['setting']['extcredits'][$ratelog[extcredits]][unit]}</td>
					<td>$ratelog[reason]</td>
				</tr>
			<!--{/loop}-->
			</table>
		</div>
	</div>
	<div class="o pns">
		<label class="z" onclick="checkall(this.form, 'logid')"><input class="pc" type="checkbox" name="chkall" />{lang checkall}</label>
		<label for="sendreasonpm"><input type="checkbox" name="sendreasonpm" id="sendreasonpm" class="pc"{if $_G['group']['reasonpm'] == 2 || $_G['group']['reasonpm'] == 3} checked="checked" disabled="disabled"{/if} />{lang admin_pm}</label>
		{lang admin_operation_explain}: <input name="reason" class="px vm" />
		<button class="formdialog" type="submit" value="true" name="ratesubmit"><span>{lang submit}</span></button>
	</div>
</form>
<!--{/if}-->


<!--{else}-->

	<h3 class="flb">
		<em id="return_$_GET[handlekey]">{lang board_message}</em>
		<!--{if $_G[inajax]}--><span><a href="javascript:;" onclick="hideWindow('$_GET[handlekey]');" class="flbc" title="{lang close}">{lang close}</a></span><!--{/if}-->
	</h3>
		<!--{if $_G[inajax]}--><input type="hidden" name="handlekey" value="$_GET[handlekey]" /><!--{/if}-->
		<div class="c altw">
		<div class="alert_right">
			<p>{lang push_succeed}</p>
			<p class="alert_btnleft">
				<a href="javascript:;" class="xi1" onclick="hideWindow('$_GET[handlekey]');showWindow('rate', 'forum.php?mod=misc&action=rate&tid=$_GET[tid]&pid=$_GET[pid]', 'get', -1);return false;">{lang click_here}</a> {lang rate_thread}
			</p>
		</div>
		</div>
		<p class="o pns">
			<button onclick="hideWindow('rate');" id="closebtn" class="pn pnc" type="button" fwin="rate"><strong>{lang close}</strong></button>
		</p>

<!--{/if}-->

<!--{template common/footer}-->